package com.sunday.boot3.user.center.pojo.dto.user;

import com.sunday.common.core.gson.GsonUtils;
import com.sunday.common.core.remoting.base.auth.BaseDTO;
import com.sunday.redisson.annotation.OpenDistributedLock;
import jakarta.validation.constraints.*;
import lombok.Data;


/**
 * @Description: 用户表 请求 DTO
 * @author: zsy
 * @Create: 2024/09/20 15:13:07
 */
@Data
public class UpdateUserReqDTO extends BaseDTO {

    /**
     * 主键
     */
    @NotNull
    @Positive
    @OpenDistributedLock(UserConstants.TABLE_NAME)
    private Long id;

    /**
     * 用户名
     */
    @NotBlank
    @Size(min = 1, max = 200)
    private String username;

    /**
     * 密码
     */
    @NotBlank
    @Size(min = 1, max = 200)
    private String password;


    @Override
    public String toString() {
        return GsonUtils.DEFAULT.toJson(this);
    }

}
